package com.mitaotao._1_语法._3_分支._3_if判断;

import java.util.Scanner;

public class _01_根据成绩输出等级_1 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入需要判断的等级:");
        String level = scanner.nextLine();
        String grade;

        if(level.equals("A")){
            grade="优秀";
        }
        else if(level.equals("B")){
            grade="良好";;
        }
        else if(level.equals("C")){
            grade="及格";
        }
        else if(level.equals("D")){
            grade="不及格";
        }
        else{
            grade="未知等级！";
        }
        System.out.println(grade);
        scanner.close();
    }
}
